home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir41
/
zip4.zip
/
DIFZIP4.BTM
< prev
next >
Wrap
Text File
|
1993-11-27
|
1KB
|
47 lines
:: Usage: difzip4 filename [zipfile [fcarg1 fcarg2 ...]]
:: This command shows differences between the file FILENAME in the current
:: directory and FILENAME in zip file %ZIP4BAK\ZIPFILE. The second argument,
:: ZIPFILE, is optional. If not present DIFZIP4 will search all zip files in
:: %ZIP4BAK until it finds FILENAME. If present, either %ZIP4BAK\ZIPFILE or
:: ZIPFILE is acceptable. The remaining arguments, FCARGs, are passed to
:: FC.EXE.
@echo off
*setlocal
*set ziplist=%2
:: If user didn't specify a zipfile, use *.zip. DIFZIP4 will search
:: all .zip files for %1. It will stop searching at the first zip file
:: that contains %1.
iff .%2 == . then
*set ziplist=*
else
:: Otherwise, get rid of path and extension (Note: assumes .zip extension).
*set ziplist=%@name[%ziplist]
endiff
:: If zip4bak envrionment variable doesn't exist then set it to default.
iff .%zip4bak == . then
set zip4bak=\zip4bak
endiff
for %%zipfile in (%zip4bak\%ziplist.zip) gosub unzipit
quit
:unzipit
:: Unzip %1 from %zipfile into the zip4bak directory.
unzip4.exe %zipfile %1 -o %zip4bak\
if %? == 0 goto :diffit
:: unzip4 did not exit normally
return
:diffit
:: Find the differences between %1 and %zip4bak\%1. We are using fc.exe, but
:: any "diff" program may be substituted.
:: You may want to TEE the output of FC to another file, e.g. TEMP.DIF
fc /n %3& %1 %zip4bak\%1 | list /s
quit